﻿Public Class frmMain
    Private Sub lnkMe_ForeColorChanged(sender As Object, e As EventArgs) Handles lnkMe.ForeColorChanged
        lnkMe.LinkVisited = False
    End Sub

    Private Sub lnkMe_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lnkMe.LinkClicked
        System.Diagnostics.Process.Start("http://github.com/Alan-Liang")
    End Sub

    Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        cmbIcon.Text = "无"
        cmbButton.Text = "确定"
    End Sub

    Private Sub cmdMain_Click(sender As Object, e As EventArgs) Handles cmdMain.Click
        Dim ico = cmbIcon.SelectedIndex
        Dim but = cmbButton.SelectedIndex
        Dim txt = tbInSide.Text
        Dim tit = tbTitle.Text
        Dim vico As Integer
        vico = 16 * ico
        MsgBox(txt, vico + but, tit)
    End Sub

    Private Sub frmMain_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.Enter And Not tbInSide.Focused Then
            cmdMain_Click(Nothing, Nothing)
        End If
    End Sub

    Private Sub cmbButton_KeyDown(sender As Object, e As KeyEventArgs) Handles cmbButton.KeyDown
        If e.KeyCode = Keys.Enter And Not tbInSide.Focused Then
            cmdMain_Click(Nothing, Nothing)
        End If
    End Sub

    Private Sub cmbIcon_KeyDown(sender As Object, e As KeyEventArgs) Handles cmbIcon.KeyDown
        If e.KeyCode = Keys.Enter And Not tbInSide.Focused Then
            cmdMain_Click(Nothing, Nothing)
        End If
    End Sub

    Private Sub tbInSide_KeyDown(sender As Object, e As KeyEventArgs) Handles tbInSide.KeyDown
        If e.KeyCode = Keys.Enter And Not tbInSide.Focused Then
            cmdMain_Click(Nothing, Nothing)
        End If
    End Sub

    Private Sub tbTitle_KeyDown(sender As Object, e As KeyEventArgs) Handles tbTitle.KeyDown
        If e.KeyCode = Keys.Enter And Not tbInSide.Focused Then
            cmdMain_Click(Nothing, Nothing)
        End If
    End Sub
End Class
